<?php
/**
 * 应用程序配置文件
 *
 * @author     mole <mole1230@gmail.com>
 * @version    $Id: main.php 81 2011-01-05 03:56:31Z mole1230 $
 */

// 应用程序配置参数
return array(
	'basePath' => dirname(__FILE__) . '/..',
	'name' => 'project name',
	'language' => 'zh_cn',

	'preload' => array(
		'log'
	),

	'import' => array(
		'application.models.*',
		'application.components.*'
	),

	// application components
	'components' => array(
		'cache' => array(
			'class' => 'CMemCache',
			'servers' => array(array('host' => 'localhost', 'port' => '11211'))
		),
		'db' => array(
			'class' => 'CDbConnection',
			'connectionString' => "mysql:host=localhost;dbname=designer;port=3306",
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '',
			'charset' => 'UTF8',
			'tablePrefix' => ''
		),
		'errorHandler' => array(
			//'errorAction' => 'site/error',
			'adminInfo' => 'mole1230@gmail.com'
		),
		'log' => array(
			'class' => 'CLogRouter',
			'routes' => array(
				array(
					'class' => 'CFileLogRoute',
					'levels' => 'error, warning'
				)
			)
		),
		'urlManager' => array(
			'urlFormat' => 'path',
			'showScriptName' => false,
			'rules' => array(
				'login' => 'site/login',
				'test' => 'site/test'
			)
		)
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params' => array(
		'adminEmail' => 'mole1230@gmail.com',
		'version' => 'alpha',
		'menu' => require_once dirname(__FILE__) . '/menu.php'
	)
);

